import request from '@/config/axios'

export interface ProductionShipmentsVO {
  id: number
  sendNumber: string
  inventoryId: number
  inventoryNumber: string
  orderNumber: string
  dictDeliveryType: number
  customerName: string
  productNumber: string
  productName: string
  productStandard: string
  productSize: string
  trainNumber: string
  proportionExpenses: string
  customerAddress: string
  packingAddress: string
  requirements: string
  loadingStartTime: Date
  loadingEndTime: Date
  licencePlate: string
  vehicleModel: string
  driverName: string
  driverPhone: string
  containerNumber: string
  containerSize: string
  lockNumber: string
  shippingNumber: string
  courierNumber: string
  sendMethod: string
  contactName: string
  contactPhone: string
  sendName: string
  receiveName: string
  creatorName: string
  updaterName: string
  dictDeliveryStatus: number
  trackingNumber: string
  filePath: string
  fileName: string
  receiveFilePath: string
  receiveFileName: string
  deliveryDate: string
  details: []
}

// 查询生产管理--产品管理—发货管理/物流信息列表
export const getProductionShipmentsPage = async (params) => {
  return await request.get({ url: `/produce/production-shipments/page`, params })
}

// 查询生产管理--产品管理—发货管理/物流信息详情
export const getProductionShipments = async (id: number) => {
  return await request.get({ url: `/produce/production-shipments/get?id=` + id })
}

// 修改生产管理--产品管理—发货管理/物流信息
export const updateProductionShipments = async (data: ProductionShipmentsVO) => {
  return await request.put({ url: `/produce/production-shipments/update`, data })
}

// 导出生产管理--产品管理—发货管理/物流信息 Excel
export const exportProductionShipments = async (data) => {
  return await request.download({ url: `/produce/production-shipments/export-excel`, data })
}

// 生产管理--产品管理—发货管理 发货
export const sendProductionShipments = async (data: ProductionShipmentsVO) => {
  return await request.put({ url: `/produce/production-shipments/send`, data })
}